package net.wexoo.onlinedivelog.proxy.diveLevel;

import java.util.List;

import net.wexoo.onlinedivelog.dal.IDAO;
import net.wexoo.onlinedivelog.entity.diveLevel.DiveLevelBean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DiveLevelProxy implements IDiveLevelProxy {

   @Autowired
   private IDAO<DiveLevelBean> diveLevelDAO;

   @Override
   public void create(DiveLevelBean newDiveLevel) {
      diveLevelDAO.saveOrUpdate(newDiveLevel);
   }

   @Override
   public List<DiveLevelBean> getList() {
      return diveLevelDAO.getAll();
   }

   @Override
   public DiveLevelBean getBeanById(int id) {
      return diveLevelDAO.getBeanById(id);
   }

}